package com.tyk.bookstore.front.system.controller;


import com.tyk.bookstore.front.common.core.model.result.R;
import com.tyk.bookstore.front.system.model.vo.CarouselVo;
import com.tyk.bookstore.front.system.service.CarouselService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author tyk
 * @description 轮播图管理
 */
@RequestMapping({"api/platform/carousel"})
@Tag(name = "平台管理/轮播图管理", description = "轮播图管理")
@RestController
@RequiredArgsConstructor
public class CarouselController {

    private final CarouselService carouselService;

    @GetMapping({"list"})
    @Operation(summary = "查询轮播图列表", description = "查询轮播图列表")
    public R<List<CarouselVo>> getList() {
        return R.ok(carouselService.getList());
    }
}
